import request from '@/utils/request'
import { SESSIONS_API } from './constants'

/**
 * 用户登录
 * @param {*} user 登录数据, { username, password }
 * @returns
 */
export const login = user => request.post(SESSIONS_API, user)

/**
 * 用户退出
 * @returns
 */
export const logout = () => request.delete(SESSIONS_API)
